import instance from ".";
//登录
export function checkUser(obj) {
   return instance({
      method: "POST",
      url: "/login",
      data: obj
   })
}
//注册
export function registerUser(obj) {
   return instance({
      method: "POST",
      url: "/register",
      data: obj
   })
}
//获取全部数据
export function getList() {
   return instance({
      method: "GET",
      url: "/home",
   })
}
//删除
export function del(id) {
   // console.log(id);
   return instance({
      method: "POST",
      url: "/del",
      data: {
         id
      }
   })
}
//查找数据
export function findOne(id) {
   return instance({
      method: "POST",
      url: "/find",
      data: {
         id
      }
   })
}
//修改数据
export function edit(id, obj) {
   return instance({
      method: "POST",
      url: "/edit",
      data: {
         id, obj
      }
   })
}